package br.com.ac.fatureweb.model.carga;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import br.com.ac.fatureweb.model.Carga;
import br.com.ac.fatureweb.utilitary.Model;

@Entity
@Table(name = "LEITURISTA_SAAE")
@SequenceGenerator(name = "SEQ_LEITURISTA_SAAE", sequenceName = "SEQ_LEITURISTA_SAAE", allocationSize = 1, initialValue = 1)
public class LeituristaSaae extends Model {

	/**
	 * 
	 */
	private static final long serialVersionUID = -380736865112299289L;

	@Id
	@GeneratedValue(generator = "SEQ_LEITURISTA_SAAE", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID")
	private Long id;

	@Column(name = "COD_LEITURISTA")
	private Long codigo;

	@Column(name = "NOME_LEITURISTA")
	private String nome;

	@ManyToOne
	@JoinColumn(name = "ID_CARGA", referencedColumnName = "ID")
	private Carga carga;

	public LeituristaSaae() {
		super();
	}

	public LeituristaSaae(Long codigo, String nome) {
		super();
		this.codigo = codigo;
		this.nome = nome;
	}

	public LeituristaSaae(Long id, Long codigo, String nome, Carga carga) {
		super();
		this.id = id;
		this.codigo = codigo;
		this.nome = nome;
		this.carga = carga;
	}

	/**
	 * @return the codigo
	 */
	public Long getCodigo() {
		return codigo;
	}

	/**
	 * @param codigo
	 *            the codigo to set
	 */
	public void setCodigo(Long codigo) {
		this.codigo = codigo;
	}

	/**
	 * @return the nome
	 */
	public String getNome() {
		return nome;
	}

	/**
	 * @param nome
	 *            the nome to set
	 */
	public void setNome(String nome) {
		this.nome = nome;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the carga
	 */
	public Carga getCarga() {
		return carga;
	}

	/**
	 * @param carga
	 *            the carga to set
	 */
	public void setCarga(Carga carga) {
		this.carga = carga;
	}

}
